package com.quarkus.demo;

import com.demo.core.service.JobService;
import com.demo.core.entity.R;
import io.quarkus.scheduler.Trigger;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

import java.util.List;

@Path("/job")
@Produces(MediaType.APPLICATION_JSON)
public class JobResource {

    @Inject
    JobService jobService;

    @GET
    @Path("/list")
    public R<List<Trigger>> getTriggers(){
        return R.ok(jobService.jobs());
    }



}
